package com.study.gank.di.component

import com.study.gank.App
import com.study.gank.di.module.ApiModule
import dagger.Component
import javax.inject.Singleton

@Singleton
@Component(modules = [ApiModule::class])
interface ApiComponent {
    fun inject(app: App)

    // 让RandomComponent继承ApiComponent，可以使用ApiModule的方法
    fun buildRandomComponent(module: RandomModule): RandomComponent

    fun buildGankGoodsComponent(module: GankGoodsModule): GankGoodsComponent
}